![]() |
GetProcessInformation |
||||
Header: | Processes.h | Carbon status: | Modified | |
Get information about a specific process.
OSErr GetProcessInformation ( const ProcessSerialNumber *PSN, ProcessInfoRec *info );
A pointer to the process serial number of a process. This number should be a valid process serial number returned from LaunchApplication, GetNextProcess, GetFrontProcess, GetCurrentProcess, or else a high-level event. You can use the constant kCurrentProcess to get information about the current process.
On return, a pointer to a structure containing information about the specified process.
A result code.
The information returned in the info parameter includes the application’s name as it appears in the Application menu, the type and signature of the application, the address of the application partition, the number of bytes in the application partition, the number of free bytes in the application heap, the application that launched the application, the time at which the application was launched, and the location of the application file.
The GetProcessInformation function also returns information about the application’s 'SIZE' resource and indicates whether the process is an application or a desk accessory.
You need to specify values for the processInfoLength, processName, and processAppSpec fields of the process information structure. Specify the length of the process information structure in the processInfoLength field. If you do not want information returned in the processName and processAppSpec fields, specify NULL for these fields. Otherwise, allocate at least 32 bytes of storage for the string pointed to by the processName field and, in the processAppSpec field, specify a pointer to an FSSpec structure.
Do not call GetProcessInformation at interrupt time.
Modified in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.
Some fields in the ProcessInfoRec structure may no longer be applicable.
© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)